// MainFrm.h : interface of the CMainFrame class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MAINFRM_H__C29309EA_7BEC_4C2B_B61A_8D927D199773__INCLUDED_)
#define AFX_MAINFRM_H__C29309EA_7BEC_4C2B_B61A_8D927D199773__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Ruler.h"
#include "ViewRef.h"
#include "ViewSap.h"
#include "ViewAdj.h"
#include "ViewSub.h"

#include "ToolView.h"

#include "XSplitterWnd.h"

#include "DDErrorDefine.h"
#include "DD_ImgAnaly.h"

extern DD_ImgAnaly g_ImgAnaly;

#define TOOLVIEWWIDTH  300
#define TOOLVIEWWIDTH2 34


enum
{
	eShowRef,
	eShowSap,
};

class CMainFrame : public CFrameWnd
{
	
public: // create from serialization only
	CMainFrame();
	DECLARE_DYNCREATE(CMainFrame)

public:
	BOOL m_bInit;

// Attributes
public:
	CSplitterWnd m_wndSplitter;
	CSplitterWnd m_wndSplitter2;

public:
	CRulerSplitterWnd m_RulersRef; 
	CRulerSplitterWnd m_RulersSap;
	CRulerSplitterWnd m_RulersAdj; 
	CRulerSplitterWnd m_RulersSub;
	
public:
	void SetShowMode(int nMode = eShowRef);
	void ShowPanelView();

	int	 m_nImageViewMode;

public:
	void ShowRulers(BOOL bShow);
	void UpdateRulersInfo(stRULER_INFO *pstDyRuler,stRULER_INFO *pstStRuler);
	void InvalidateRulers();
	

public:
	ViewRef *m_pViewRef;
	ViewSap *m_pViewSap;
	ViewAdj *m_pViewAdj;
	ViewSub *m_pViewSub;

	CToolView *m_pToolView;
	

	


// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMainFrame)
	virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CMainFrame();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:  // control bar embedded members
	CStatusBar  m_wndStatusBar;
	CToolBar    m_wndToolBar;

// Generated message map functions
protected:
	//{{AFX_MSG(CMainFrame)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MAINFRM_H__C29309EA_7BEC_4C2B_B61A_8D927D199773__INCLUDED_)
